package com.itheima.dao;

import com.itheima.pojo.Visitor;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface VisitorMapper extends Mapper<Visitor> {

    @Select("SELECT count(t_web_visit.ip)  from t_web_visit WHERE t_web_visit.create_time like '${value}%' GROUP BY t_web_visit.ip")
    List<String> getVisitByWeek(String date);


    @Select("SELECT count(t_web_visit.ip) from t_web_visit WHERE t_web_visit.create_time like '${value}%' GROUP BY t_web_visit.ip")
    List<Integer> getIpCountByDate(String date);
}
